package com.cyjt.operation.ui;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;

import com.cyjt.operation.R;
import com.cyjt.operation.uidynamic.DynamicMapAndListActivity;
import com.cyjt.operation.uitools.ToolsActivity;
import com.cyjt.operation.view.ActionBarLayout;

/**
 * 部署功能面板的Activity
 * 
 * @author LTP
 *
 */
public class DeployActivity extends Activity implements OnClickListener {
	/** 静态部署 */
	private ImageView imageView_deploy_static;
	/** 动态部署 */
	private ImageView imageView_deploy_dynamic;
	/** 部署工具 */
	private ImageView imageView_device_toolsbox;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_deploy);
		initView();
	}

	/**
	 * 控件初始化
	 */
	private void initView() {
		ActionBarLayout.setTitle("部署");
		imageView_deploy_static = (ImageView) findViewById(R.id.imageView_deploy_static);
		imageView_deploy_static.setOnClickListener(this);
		imageView_deploy_dynamic = (ImageView) findViewById(R.id.imageView_deploy_dynamic);
		imageView_deploy_dynamic.setOnClickListener(this);
		imageView_device_toolsbox = (ImageView) findViewById(R.id.imageView_device_toolsbox);
		imageView_device_toolsbox.setOnClickListener(this);
	}

	@Override
	public void onClick(View v) {
		// TODO 控件点击事件
		switch (v.getId()) {
		case R.id.imageView_deploy_static:
			// TODO 跳转到路段的Activity
			startActivity(new Intent(this, NewPickRoadAreasActivity.class));
			break;
		case R.id.imageView_deploy_dynamic:
			// TODO 跳转到地图查找的Activity
			startActivity(new Intent(this, DynamicMapAndListActivity.class));
			break;
		case R.id.imageView_device_toolsbox:
			// TODO 跳转到部署工具的Activity
			startActivity(new Intent(this, ToolsActivity.class));
			break;
		default:
			break;
		}

	}
}
